#include <cstring>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
#define rep(i,a,n) for(int i=a;i<=n;i++)
#define per(i,a,n) for(int i=n;i>=a;i--)
#define fi first
#define se second 
typedef long long ll;
typedef double de;
typedef pair<int,int> PII;
typedef unsigned long long ull;
const int N = 110;

int a[N];
int n;
void slove() {
    cin >> n;
    string s;
    cin >> s;
    int x = 0, y = 0;
    char pre = '?';
    for (int i = 0; i < s.length(); i += 2) {
        if (s[i] != s[i + 1])x++;
        else {
            if (pre != s[i])y++;
            pre = s[i];
        }
    }
    cout << x << " " << max(1, y) << endl;
}
int main()
{
    int t;
    scanf("%d",&t);
    rep(o,1,t)
    {
        slove();
    }
    return 0;
}

